package com.fezs.mybatis.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author zhukai
 * @since 2022/8/18
 */
@Getter
@Setter
@ToString
public class BaseEntity extends AbstractEntity {

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @Version
    @TableField(value = "version")
    private Integer version;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(value = "deleted")
    private Boolean deleted;

}
